<?php /* Smarty version 2.6.16, created on 2013-09-10 22:42:47
         compiled from ../templates/default//modules/jobs/myjobs.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'truncate', '../templates/default//modules/jobs/myjobs.tpl', 134, false),array('modifier', 'base64_encode', '../templates/default//modules/jobs/myjobs.tpl', 137, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php echo '<link rel="stylesheet" type="text/css" href="';  echo $this->_tpl_vars['siteroot'];  echo '/templates/default/style/dashboard.css"><link rel="stylesheet" type="text/css" href="';  echo $this->_tpl_vars['siteroot'];  echo '/templates/default/style/find_job_list.css"><script type="text/javascript" src="';  echo $this->_tpl_vars['siteroot'];  echo '/greybox/greybox.js"></script><link href="';  echo $this->_tpl_vars['siteroot'];  echo '/greybox/greybox.css" rel="stylesheet" type="text/css" media="all" />'; ?>

<?php echo '
<script type="text/javascript" language="javascript">
function searchOrder()
{
	
	var Jobtype = $(\'#jobtype\').val();
	var Budget = $(\'#budget\').val();
		var Project_status = $(\'#project_status\').val();
		if(Jobtype!=\'\' || Budget!=\'\' || Project_status!=\'\'){
			window.location = SITEROOT+\'/jobs/myjobs/?Jobtype=\'+Jobtype+\'&Budget=\'+Budget+\'&Project_status=\'+Project_status;
		}
		
	//}
}

// For Declined message
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.my_review").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
 			GB_show("",this.href,450,700);
  			return false;
       });
     });
</script>
'; ?>


<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>


<section class="middle_portion">
	<section class="inner_head">Dashboard</section>
    <section class="inner_containstart">
    	<!-- dashboard Left Content Start -->
        	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['cms_left_content'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        <!-- dashboard Left Content End -->
        <!-- dashboard Right Content Start -->
        	<section class="dash_right">
            <section class="title_box">
            	<h4>My Jobs</h4>
            	 <section class="clear"></section>
                 
                </section>                             
				<?php if ($this->_tpl_vars['msg']): ?> <span style="padding:10px"><?php echo $this->_tpl_vars['msg']; ?>
 </span><?php endif; ?>
                
                <div class="faq_legend_portion">
                            <div class="faq_legend_hd">Legend :</div>
                            <div class="faq_icons_grebox" style="width:659px;" >
                                <div class="faq_column1">
                                    <div>
                                        <div class="faq_active_icon">Open status means Active Jobs.</div>
                                        <div class="clear"></div>
                                        <div class="faq_active_icon">Accepted means Award the job to Tradesman.</div>
                                        <div class="clear"></div>
                                    </div>
                                   
                                </div>
                                <div class="faq_column1">
                                 
                                 
                                    <div>
                                        <div class="faq_active_icon">Review means rate tradesman.</div>
                                        <div class="clear"></div>
                                        <div class="faq_active_icon">Purchase means select Tradesman.</div>                                        
                                        <div class="clear"></div>
                                        
                                    </div>
                
                                </div>  
								 <div class="clear"></div>
                                <p>Review all suppliers messages by clicking on the link in "Suppliers" column</p>
                                <div class="clear"></div>
                             
                           </div>  
                            
                           
                           <div class="clear"></div>
                           
                         </div>
                <section class="mainbox_findjobs">

				<section class="jobs_manag_box">
                 <section class="group_search_box">
                 <form name="searchfrm" id="searchfrm" action="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/myjobs/" method="POST" >
					 <select class="select" name="jobtype" id="jobtype" style="width:200px;">
                        <option value="0">Select Job Type</option>
                        <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['getallTradeJobType']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                        <option value="<?php echo $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['id']; ?>
" <?php if ($_GET['id2'] == $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['id'] || $_POST['jobtype'] == $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['id']): ?> selected="selected" <?php endif; ?>><?php echo $this->_tpl_vars['getallTradeJobType'][$this->_sections['i']['index']]['trade_category']; ?>
</option>				                        
                        <?php endfor; endif; ?>
	                 </select>   &nbsp;&nbsp;
                     <select class="select" name="budget" id="budget" style="width:180px;">
                        <option value="0">Select Approximate Budget</option>
                        <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['getallBudget']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                        <option value="<?php echo $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_id']; ?>
" <?php if ($_GET['id3'] == $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_id'] || $_POST['budget'] == $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_id']): ?> selected="selected" <?php endif; ?>>Under $<?php echo $this->_tpl_vars['getallBudget'][$this->_sections['i']['index']]['budget_name']; ?>
</option>                     
                        <?php endfor; endif; ?>
                     </select>   &nbsp;&nbsp;                    
                     <select class="select" name="project_status" id="project_status" style="width:112px;">
                        <option value="0">Select Stauts</option>
                        <option value="Open" <?php if ($_GET['id4'] == 'Open' || $_POST['project_status'] == 'Open'): ?> selected="selected" <?php endif; ?>>Open</option>
                        <option value="Accept" <?php if ($_GET['id4'] == 'Accept' || $_POST['project_status'] == 'Accept'): ?> selected="selected" <?php endif; ?>>Accepted</option>                        
                        <option value="Completed" <?php if ($_GET['id4'] == 'Completed' || $_POST['project_status'] == 'Completed'): ?> selected="selected" <?php endif; ?>>Completed</option>
                     </select>   &nbsp;&nbsp;                    
                    <input type="submit" class="btn" value="Go">
                    &nbsp;&nbsp;
                    <input type="button" class="btn btnwdth70" value="Clear" onclick="javascript:window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/myjobs/';">
                    </form>
                    <section class="clear"></section>
                  </section>
                	<dl>
                    	<dt class="col1">Job ID</dt>
                    	<dt class="col2">Job Type</dt>
                        <dt class="col3">Postal Code</dt>
                        <dt class="col4">Job Description</dt>
                        <dt class="col5" style="text-align:justify">Budget</dt>
                        <dt class="col6">Status</dt>
                        <dt class="col7">Suppliers</dt>
                        <dt class="col8">Review</dt>
                        <dt class="col9">Action</dt>
                        <section class="clear"></section>
                    </dl>
                    <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['jobsArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                    <dl>
                    	<dd class="col1">#PR<?php echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['postjob_id']; ?>
</dd>
                    	<dd class="col2"> <?php echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['jobtypename']; ?>
 </dd>
                        <dd class="col3"> <span style="padding-left:20px;"><?php echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['area']; ?>
</span> </dd>
                        <dd class="col4">
                        	<?php echo ((is_array($_tmp=$this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['job_desc'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 50, "...") : smarty_modifier_truncate($_tmp, 50, "...")); ?>
 
                        </dd>
                        <dd class="col5" style="text-align:justify">$<?php echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['budgetname']; ?>
</dd>
                        <dd class="col6"><?php if ($this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['project_status'] == 'Accept'): ?> <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/Accept/<?php echo ((is_array($_tmp=$this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['postjob_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/myjobs/" onclick="javascript:return confirm('Are you sure do you want to complete this job?');" >Accepted</a> <?php else:  echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['project_status'];  endif; ?></dd>
                        <dd class="col7"><span style="padding-left:20px;"><a <?php if ($this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['countofleads'] > '0'): ?> href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/1/<?php echo ((is_array($_tmp=$this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['postjob_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/myjobleads/"  <?php else: ?> href="javascript:;" <?php endif; ?> style="padding-left:10px;">[<?php echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['countofleads']; ?>
]</a></span></dd>
                        <dd class="col8"><?php if ($this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['project_status'] == 'Completed'): ?> <?php if ($this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['reviewid'] == ''): ?> <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/<?php echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['postjob_id']; ?>
/post/postreview/" class="my_review">Post Reviews</a><?php else: ?><a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/<?php echo $this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['reviewid']; ?>
/see/postreview/" class="my_review">See Reviews</a><?php endif;  else: ?>---<?php endif; ?></dd>
                        <dd class="col9"><a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/<?php echo ((is_array($_tmp=$this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['postjob_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/viewjob/" ><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/icon-search.png" width="20" height="22" alt="View Detail" title="View Detail"/></a> &nbsp;<a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/<?php echo ((is_array($_tmp=$this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['postjob_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/editjob/" ><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/edit_icon.png" width="20" height="22" alt="Edit Job" title="Edit Job"/></a> &nbsp;<?php if ($this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['project_status'] == 'Open'): ?> <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/jobs/delete/<?php echo ((is_array($_tmp=$this->_tpl_vars['jobsArray'][$this->_sections['i']['index']]['postjob_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
/myjobs/" onclick="javascript:return confirm('Are you sure do you want to delete this record?');"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/delete_icon.png" width="20" height="22" alt="Delete" title="Delete"/></a><?php else: ?><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/icon-warnning.png" width="20" height="22" alt="Cant Delete" title="Cant Delete"/> <?php endif; ?></dd>
                        <section class="clear"></section>
                    </dl>
                    <?php endfor; else: ?>
                    	<div class="error" style="padding:10px;text-align:center;">Oops, Sorry there are no jobs.</div>
                    <?php endif; ?>
                  		
                        <?php if ($this->_tpl_vars['pagenation']): ?>
                            <section class="pagna">
                            <?php echo $this->_tpl_vars['pagenation']; ?>

                            </section>
                        <?php endif; ?>	     

                        
                        <section class="clear"></section>
                </section>   
                 <section class="bgimg_shadow"></section>
				
			<section class="clear"></section>
            
            </section>
            
            
                
                
            </section>
        <!-- dashboard Right Content End -->
        	<section class="clear"></section>
    </section>
</section>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>